package com.xdap.water.pojo;

import com.definesys.mpaas.query.annotation.Column;
import com.definesys.mpaas.query.annotation.SystemColumn;
import com.definesys.mpaas.query.annotation.SystemColumnType;
import com.definesys.mpaas.query.json.MpaasDateTimeDeserializer;
import com.definesys.mpaas.query.json.MpaasDateTimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.util.Date;

@Data
public class SystemCommonPojo {
    @Column("id")
    private String id;

    @Column("document_id")
    private String documentId;

    @Column("tab_doc_id")
    private String tabDocId;

    private String status;

    @Column("tenant_id")
    private String tenantId;

    @Column("form_id")
    private String formId;

    @Column("process_id")
    private String processId;

    @Column("approver_id")
    private String approverId;

    @Column("owner")
    String owner;

    @Column("created_by")
    String createdBy;

    @Column("last_updated_by")
    String lastUpdatedBy;

    @JsonDeserialize(
            using = MpaasDateTimeDeserializer.class
    )
    @JsonSerialize(
            using = MpaasDateTimeSerializer.class
    )
    @Column("creation_date")
    Date creationDate;

    @JsonDeserialize(
            using = MpaasDateTimeDeserializer.class
    )
    @JsonSerialize(
            using = MpaasDateTimeSerializer.class
    )
    @Column("last_update_date")
    Date lastUpdateDate;

    @Column("object_version_number")
    @SystemColumn(SystemColumnType.OBJECT_VERSION)
    Integer objectVersionNumber;
}
